<script type="text/javascript">
$('.fancybox-media').fancybox({
              openEffect	: 'elastic',
              closeEffect	: 'elastic',
		helpers : {
			media : {}
		},
              //padding     : 0,
              margin      : 50
            });
</script>
<h1>Modelos 3D de <%= @cultural_heritage_cultural_heritage.name %> (<%= @cultural_heritage_cultural_heritage.nationalRegistrationCode %>)</h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<br/>
<div class="field">
    <b>Descripción</b>
    <%= @cultural_heritage_cultural_heritage.description %>
</div>
<% if @cultural_heritage_cultural_heritage_models.size > 0 %>

<br></br>
<table class="paginated_table sorted_table">
  <thead>
  <tr>
     <th>Modelo</th>
     <th>Título</th>
     <th>Descripción</th>
     <th>Autor</th>
     <th></th>
  </tr>
</thead>
<tbody>
    <% @cultural_heritage_cultural_heritage_models.each do |cultural_heritage_cultural_heritage_avatar| %>
    <tr>
      <td>
        <a class="fancybox-media" href="<%=cultural_heritage_cultural_heritage_avatar.model_url%>" title="<%=cultural_heritage_cultural_heritage_avatar.description%>">
          Modelo
        </a>
      </td>
      <td><%=cultural_heritage_cultural_heritage_avatar.title%></td>
      <td><%=cultural_heritage_cultural_heritage_avatar.description%></td>
      <td>
      <%if !cultural_heritage_cultural_heritage_avatar.user.blank?%>
            <%=cultural_heritage_cultural_heritage_avatar.obj_user.str_complete_name%>
      <%end%>
      </td>
      <td>
      <%= link_to image_tag("navi/cross-16-ns.png", :border => 0, :title => 'Eliminar'),{:controller=>"/cultural_heritage/cultural_heritage_properties",  :action => 'delete_model', :id => cultural_heritage_cultural_heritage_avatar.id},{:confirm => 'Esta seguro?'} %>
        </td>
    </tr>
    <% end %>
</tbody>
</table>
<% else %>
  <p>Ningun Modelo encontrado</p>
<% end %>
<br />

<%= link_to 'Nuevo Modelo',{:controller=>"/cultural_heritage/cultural_heritage_properties",:action => 'new_model',:id => @cultural_heritage_cultural_heritage.id}%>